﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using Models;


namespace BLL
{
    public class AuthorityManager
    {
        private AuthorityService objAuthorityService = new AuthorityService();
        private UserTeamRoleService objUserTeamRoleService = new UserTeamRoleService();
        private UserInfoService objUserInfoService = new UserInfoService();
        private WorkflowService objWorkflowService = new WorkflowService();
        /// <summary>
        /// 添加用户信息
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public int InsertUser(UserInfo User)
        {
            return objAuthorityService.InsertUser(User);
        }
        /// <summary>
        /// 添加权限
        /// </summary>
        /// <param name="UserAuthority"></param>
        /// <returns></returns>
        public int InsertUserTeamRoles(UserTeamRole UserAuthority)
        {
            return objAuthorityService.InsertUserTeamRoles(UserAuthority);
        }
        /// <summary>
        /// 获取所有团队信息
        /// </summary>
        /// <returns></returns>
        public List<Team> GetTeamInfo()
        {
            return objUserTeamRoleService.GetTeamInfo();
        }
        /// <summary>
        /// 获取所有角色信息
        /// </summary>
        /// <returns></returns>
        public List<Role> GetRoleInfo(int teamId)
        {
            return objUserTeamRoleService.GetRoleInfo(teamId);
        }
        /// <summary>
        /// 获取所有用户信息
        /// </summary>
        /// <returns></returns>
        public List<UserInfo> GetUserInfo()
        {
            return objUserInfoService.GetUserInfo();
        }
        /// <summary>
        /// 获取所有工作流模板信息
        /// </summary>
        /// <returns></returns>
        public List<WorkflowMould> GetWorkflowMould()
        {
            return objWorkflowService.GetWorkflowMould();
        }
        /// <summary>
        /// 获取用户用户团队角色工作流号对应信息
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public List<UserTeamRole> GetUserTeamRoles(UserTeamRole user)
        {
            return objAuthorityService.GetUserTeamRoles(user);
        }

    }
}
